
#include "dynamicname.h"
#include "dynamicnameadaptor.h"

#include <QtDBus>

DynamicName::DynamicName(QObject* parent)
  : QObject(parent)
{
  new DynamicNameAdaptor(this);
  QDBusConnection dbus = QDBusConnection::sessionBus();
  dbus.registerObject("/DynamicName", this);
  dbus.registerService("com.kdab.DynamicName");
}

QString DynamicName::name() const
{
  return m_name;
}

void DynamicName::setName(const QString& name)
{
  if (name == m_name)
    return;

  m_name = name;
  emit nameChanged();
}

